package com.datareport.data.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.datareport.data.entity.DerivedInfo;
import com.datareport.data.entity.DisabilityInfoNow;
import com.datareport.data.mapper.DerivedInfoMapper;
import com.datareport.data.service.DerivedInfoService;
import com.datareport.data.service.impl.ErrorInfoServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DataReport
 * @since 2021-11-18
 */
@RestController
public class DerivedInfoController {

    @Autowired
    DerivedInfoService derivedInfoService;


    /**
     *
     * @param pageNum 请求的数据页数
     * @param pageSize 请求数据条数
     * @return
     */
    @ApiOperation("查询所有信息接口")
    @GetMapping("/DerivedInfo/selectAll")
    public IPage<DerivedInfo> selectDisabilityInfoPage(@RequestParam("pageNum") Integer pageNum,
                                                       @RequestParam("pageSize") Integer pageSize) {

        Page<DerivedInfo> pastPage = derivedInfoService.selectAll(pageNum, pageSize);

        return pastPage;
    }

}
